Detecting seizures based on heartbeat data

ABSTRACT

A method includes receiving heartbeat data of a patient and receiving activity data of the patient. The activity data includes one or more activity values that are related to an activity level of the patient and that are measured independently of the heartbeat data. The method further includes determining a value of a weighting factor based on the activity data. The method also includes determining modified heartbeat data by applying the weighting factor to at least a portion of the heartbeat data. The method also includes detecting a seizure event based on the modified heartbeat data.

RELATED APPLICATION

This application is related to U.S. patent application Ser. No. ______,Attorney Docket Number 1000.321, entitled “Cranial Nerve Stimulation ToTreat Depression During Sleep,” filed contemporaneously herewith, whichis hereby incorporated by reference as though fully set forth herein.

FIELD OF THE DISCLOSURE

The present disclosure is generally related to detecting seizures basedon heartbeat data.

BACKGROUND

Advances in technology have led to the development of medical devicesthat can be implanted within a living organism, such as a human, toprovide treatment or monitoring. For example, a medical device maydetect when a seizure occurs in a patient. Early detection of a seizuremay allow appropriate responsive action to be taken. Such actions mayinclude sending an alert signal to the patient or a caregiver,initiating a treatment therapy, or taking remedial action such as makingthe patient and/or an environment around the patient safe. One way todetect seizures is by monitoring a heartbeat of the patient to determinewhether the heartbeat increases beyond a threshold. However, otherfactors can also cause the heartbeat to increase beyond the threshold.Thus, seizure detection based on a heartbeat may be subject to asignificant number of false positives.

SUMMARY

A medical device monitoring and/or providing therapy to a patient maydetect and respond to seizures based on patient heartbeat data and basedon patient activity data (including patient state data). The medicaldevice may use a seizure detection algorithm that is capable ofdistinguishing between pathological changes in the detected heartbeat,which may indicate a seizure, and non-pathological changes in thedetected heartbeat. The non-pathological changes may correspond tonormal physiological functioning as opposed to a seizure. Thenon-pathological changes may be difficult to distinguish from thepathological changes based solely on information associated with theheartbeat.

For example, the patient's heartbeat may increase when a seizure eventoccurs (e.g., a pathological change). However, the patient's heartbeatmay also change when the patient engages in a state of physical activity(such as running, jumping, exercising, swimming, etc.) or the patientassumes a state or changes to or from a state (such as initiatingrunning, awaking from sleep, going to sleep, changing from healthy tosick, etc.). Other external factors may also cause the patient'sheartbeat to increase. For example, a change in temperature maycontribute to an increase in the patient's heartbeat. It may becomedifficult for the medical device to determine whether an increase in thepatient's heartbeat is due to a seizure, physical activity, or otherexternal factors.

To address such concerns, the medical device may account for thephysical activity and/or other external factors when determining whetheror not a seizure event is indicated by heartbeat data. For example, themedical device may use an algorithm that detects whether or not aseizure event is present based on a background heart rate and aforeground heart rate. The foreground heart rate may correspond to arate at which the patient's heart is beating at a present time, whichcan be the most-recent heart rate value obtained from the patient or bean average of several recent heart rate values that are adjacent to andinclude the most-recent heart rate value. The background heart rate maybe a function of the foreground heart rate and a previously-determinedbackground heart rate. For example, the algorithm may be expressed asBG_(n)=λ*BG_(n-1)+(1−λ)*FG_(n), where BG_(n) is the background heartrate at the present time (n), BG_(n-1) is the previously-determinedbackground heart rate, FG_(n) is the foreground heart rate at thepresent time (n), and λ is a weighting factor. The previously-determinedbackground heart rate may correspond to an average heart rate during amoving period of time or time window (e.g., an average heart rate duringa moving five minute time window that remains immediately prior to thepresent time), with the period of time or time window being selected tocapture a sufficient number of stable heart beats to provide an averageheart rate value that is representative of the patient's heart rate andnot heavily influenced by any extremely-high or low single heart beat orgrouping of heart beats. When a ratio of the foreground heart rate andthe background heart rate at the present time exceeds a seizuredetection threshold, the medical device may determine that a seizureevent is present.

A value of the weighting factor may be based on physical activity and/orother external factors that affect heart rate. The weighting factor maybe zero, one, or between zero and one. As can be appreciated, when theweighting factor is set at a high value that is at or close to one, thecalculation of the background heart rate will be heavily influenced bythe value of the previously determined-background heart rate, thusproviding a background heart rate that is greatly dependent on a windowof time corresponding to the time period assigned when determining thepreviously-determined heart rate. As can also be appreciated, when theweighting factor is set at a low value that is at or close to zero, thecalculation of the background heart rate will be heavily influenced bythe value of the foreground heart rate, thus providing a backgroundheart rate that is greatly dependent on an instant heart rate orrecently-measured heart rate values. As can be further appreciated, whenthe weighting factor is set at a middle value that is at or close to0.5, the calculation of the background heart rate will be equallyinfluenced by the values of the previously-determined heart rate and theforeground heart rate, thus providing a background heart rate that isbalanced in its dependence on previously-measured heart rate values andrecently-measured heart rate values. As an illustrative non-limitingexample, the value of the weighting factor may be approximately equal to0.95 when the patient is in an idle state (e.g., sleep), which wouldprovide a background heart rate that heavily depends (e.g., 95%dependence) on the previously-determined background heart rate andlightly depends (e.g., 5% dependence) on the foreground heart rate. Whenthe patient is undergoing physical activity such as running on atreadmill, or the patient is subject to external factors that affectheart rate, the value of the weighting factor may be set to a lesservalue than with the idle state, which will generate a background heartrate that is more dependent on the foreground heart rate than thepreviously-determined background heart rate, and/or generate abackground heart rate that is based on a balancing of the foregroundheart rate and the previously-determined heart rate. For example, whenthe value of the weighting factor is reduced from 0.95 to 0.50 when thepatient leaves an idle state to undergo a particular physical activity,the background heart rate can be 50% dependent on thepreviously-determined background heart rate and 50% dependent on theforeground heart rate, thereby providing a background heart rate thataccounts for a recent change in the heart rate due to the physicalactivity and accounts for the more-stable and longer-measured heart ratethat was observed before the recent change in heart rate.

Thus, physical activity and/or external factors may be used alone or incombination to determine the background heart rate by changing the valueof the weighting factor based on the physical activity and/or externalfactors that affect heart rate. As a result, when the background heartrate is compared to the foreground heart rate to determine whether aseizure event is occurring, physical activity and/or external factorsare taken into account.

In a particular embodiment, a method includes receiving heartbeat dataof a patient and receiving activity data of the patient. The activitydata can provide one or more activity values that are related to anactivity level of the patient and that are independent of the heartbeatdata. The method further includes determining a value of a weightingfactor based on the activity data. The method also includes determiningmodified heartbeat data by applying the weighting factor to at least aportion of the heartbeat data. The method also includes detecting aseizure event based on the modified heartbeat data.

In another particular embodiment, a medical device includes a firstinterface to receive heartbeat data of a patient and a second interfaceto receive activity data of the patient. The activity data includes oneor more activity values that are related to an activity level of thepatient and that are measured independently of the heartbeat data. Themedical device also includes a processor to determine a value ofweighting factor based on the activity data. The processor determinesmodified heartbeat data by applying the weighting factor to at least aportion of the heartbeat data. The processor also detects a seizureevent based on the modified heartbeat data.

In another particular embodiment, a non-transitory computer readablemedium stores instructions that are executable be a processor to causethe processor perform operations. The operations include receivingheartbeat data of a patient and receiving activity data of the patient.The activity data includes one or more activity values that are relatedto an activity level of the patient and that are measured independentlyof the heartbeat data. The operations further include determining avalue of a weighting factor based on the activity data and determiningmodified heartbeat data by applying the weighting factor to at least aportion of the heartbeat data. The operations also include detecting aseizure event based on the modified heartbeat data.

The features, functions, and advantages that have been described can beachieved independently in various embodiments or may be combined in yetother embodiments, further details of which are disclosed with referenceto the following description and drawings.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a particular illustrative embodiment of a diagram illustratingheartbeat data modification based on activity data;

FIG. 2 is a particular embodiment of a system that is operable to detecta seizure event based on heartbeat data and activity data;

FIG. 3 is a block diagram of a particular embodiment of a medical devicein communication with a patient that is operable to detect a seizureevent based on heartbeat data and activity data; and

FIG. 4 is a flow chart of a particular embodiment of a method ofdetecting a seizure event based on heartbeat data and activity data.

DETAILED DESCRIPTION

FIG. 1 is a particular illustrative embodiment of a diagram 100illustrating heartbeat data modification based on physical activity. Thediagram 100 includes a first trace 110 illustrating an electrocardiogramof a patient, a second trace 120 illustrating a background heart rate ofthe patient which is derived from the first trace 110 and calculatedusing a fixed weighting factor, a third trace 130 illustrating aforeground heart rate of the patient which is derived from the firsttrace 110, and a fourth trace 140 illustrating a modified backgroundheart rate of the patient which is derived from the first trace 110 andcalculated using a weighting factor and adjusted based on activity data.The four traces 110, 120, 130, and 140 of diagram 100 are aligned witheach other to provide identical x-axis representation of time and toprovide similar y-axis representations of magnitude of the measured orcalculated parameter.

The electrocardiogram illustrated in the first trace 110 may include aplurality of R waves. For example, the electrocardiogram may include afirst R wave 102 and a second R wave 104. A time between respectivepoints on the first R wave 102 and the second R wave 104 is an R-Rinterval. The first R wave 102 and the second R wave 104 may correspondto a first and second heartbeat, respectively, and the R-R interval maycorrespond to an amount of time that elapses between consecutiveheartbeats (e.g., a heartbeat rate, also referred to as a “heart rate”).

A faster heartbeat may result in a shorter R-R interval betweenconsecutive heartbeats (e.g., R waves). For example, a third R wave 106and a fourth wave 108 may have a shorter R-R interval than the R-Rinterval between the first and second R waves 102, 104. Thus, thepatient's heart is beating at a faster rate at a time corresponding tothe third and fourth R waves 106, 108 as opposed to a time correspondingto the first and second R waves 102, 104. As illustrated by the firsttrace 110, an increased rate of the patient's heartbeat (e.g., shorterR-R intervals) may be indicative of a seizure event. For example, theseizure event may begin at a critical time (T_(a)) when the rate of thepatient's heartbeat exceeds a threshold level.

The background heart rate of the patient illustrated in the second trace120 may be expressed as BG_(R)=0.95*BG_(n-1)+0.05*FG_(n), where BG_(R)is a reference background heart rate at the present time (n), BG_(n-1)is the previously-determined background heart rate, and FG_(n) is theforeground heart rate at the present time (n). The previously-determinedbackground heart rate may be generated by taking an electrocardiogramover a particular time span and performing an infinite impulse response(IIR) operation on the electrocardiogram. For example, thepreviously-determined background heart rate may correspond to an IIRoperation on an electrocardiogram spanning a five minute time periodbefore the present time (n). In another example, thepreviously-determined background heart rate may correspond to an IIRoperation on an electrocardiogram spanning a time period determined by anumber of heart beats before the present time (n).

The foreground heart rate (FG_(n)) at the present time (n) isillustrated in the third trace 130. The foreground heart rate may begenerated by taking an electrocardiogram over a time span correspondingto a most recent R-R interval. For example, the foreground heart ratemay correspond to a current heart rate. When the current heart rateincreases, a magnitude of the foreground heart rate increases. When thecurrent heart rate decreases, the magnitude of the foreground heart ratedecreases.

Referring back to the exemplary embodiment represented with second trace120, ninety-five percent of the reference background heart rate is basedon a heart rate spanning over a previous five minute period (e.g., thepreviously-determined background heart rate) and five percent of thereference background heart rate is based on the foreground heart rateillustrated in the third trace 130. Thus, when determining the referencebackground heart rate, the previously-determined background heart rateis weighted at a fixed rate (e.g., 0.95) and the foreground heart rateis weighted at a fixed rate (e.g., 0.05). When comparing the foregroundheart rate illustrated in the third trace 130 to the referencebackground heart rate illustrated in the second trace 120, a ratio ofthe foreground heart rate and the reference background heart rate may becalculated, and the ratio may be compared to a seizure threshold and,when the threshold is exceeded, detect the occurrence of a seizure eventat the critical time (T_(c)).

However, if the increased heart rate at the critical time (T_(a)) isassociated with a physical activity of the patient as opposed to aseizure, then using the reference background heart rate in the secondtrace 120 may result in a false detection of a seizure event. Forexample, volitional motion or other non-seizure activity may increaseheart rate, and the dominance of the previously-determined backgroundheart rate (when, e.g., weighted at 95%) in the calculation of thereference background heart rate and/or the ratio may result in a falseindication of a seizure event. To reduce the likelihood of detecting afalse seizure event, the modified background heart rate illustrated inthe fourth trace 140 may be used along with the foreground heart rateillustrated in the third trace 130 to detect whether a seizure event ispresent.

For example, the modified background heart rate may factor in anactivity level of the patient to account for the increased heart rate.The modified background heart rate may be expressed asBG_(M)=λ*BG_(n-1)+(1−λ)*FG_(n), where BG_(M) is the modified backgroundheart rate at the present time (n), BG_(n-1) is thepreviously-determined background heart rate, FG_(n) is the foregroundheart rate at the present time (n), and λ is a weighting factor.

A value of the weighting factor may be based on activity data. In aparticular embodiment, the activity data includes accelerometer data,body temperature data, electromyography data, respiration data,perspiration data, impedance data, or a combination thereof. Theactivity data may include data obtained from an electroencephalography(EEG) sensor, an electrooculography (EOG) sensor, an electrocardiography(ECG) sensor, an electromyography (EMG) sensor, an accelerometer, or acombination thereof, as disclosed in contemporaneously-filed U.S. patentapplication Ser. No. ______ (Attorney Docket Number 1000.321), entitled“Cranial Nerve Stimulation To Treat Depression During Sleep,” which ishereby incorporated by reference as though fully set forth herein. Inanother particular embodiment, the activity data may correspond to oneor more activity values that are related to an activity level of thepatient. The activity values may be measured independently of the heartrate of the patient (e.g., measured independently of heartbeat data).The activity values may also be based on a state of the patient or achange of patient state, e.g., based on an activity state, a sleepstate, or a change in the patient activity or sleep state. The activityvalues may also be related to measurements corresponding patienttemperature, patient muscle activity, breathing rate, a skin responsesuch as sweating, or combinations thereof. For example, activity datameasured with an accelerometer may have a first activity valueassociated with running, activity data measured with a respirationsensor may have a second activity value associated with walking,activity data measured with an EEG sensor may have a third activityvalue associated with sleeping, etc. With regard to sleeping, theactivity value may correspond to a sleep state of the patient so as toincrease or decrease the weighting factor when the patient is in a sleepstate that, for example, exhibits reduced or increased body movements,when the patient transitions from one sleep state to another sleepstate, when the patient moves or changes positions during sleep, and/orwhen the patient awakes from sleep, as disclosed incontemporaneously-filed U.S. patent application Ser. No. ______(Attorney Docket Number 1000.321), entitled “Cranial Nerve StimulationTo Treat Depression During Sleep,” which is hereby incorporated byreference as though fully set forth herein. The value of the weightingfactor may decrease as an activity level of the patient increases. As anon-limiting example, the value of the weighting factor may beapproximately 0.95 when the activity corresponds to sleeping or to asleep state, 0.75 when the activity corresponds to walking, and 0.50when the activity corresponds to running. As the weighting factordecreases, the modified background heart rate becomes more dependent onthe foreground heart rate (e.g., more dependent on a current heart rateof the patient) and less dependent on the previously-determinedbackground heart rate. Thus, the modified background heart rate updatesmore quickly than the reference background heart rate when the patientis engages in activities that cause an immediate or foreseeable increasein heart rate.

The modified background heart rate may become increasingly similar tothe foreground heart rate as the value of the weighting factordecreases. For example, the third trace 130 (e.g., the foreground heartrate) may become increasingly similar to the fourth trace 140 (e.g., themodified background heart rate) as the value of the weighting factorapproaches zero. As a result, when comparing the foreground heart rateillustrated in the third trace 130 to the modified background heart rateillustrated in the fourth trace 140, a ratio of the foreground heartrate and the modified background heart rate may not exceed the seizurethreshold at the critical time (T_(c)) when the increased heart rate isbased on patient activity. Thus, using the modified background heartrate to detect a seizure event may yield fewer false positives.

Referring to FIG. 2, a system 200 that is operable to detect a seizureevent based on heartbeat data and activity data is shown. The system 200includes a patient-contacting medical device 202, which can be, forexample, an implantable medical device or an external device fixed tothe surface of a patient's skin. The medical device 202 includes aprocessor 206 that is coupled to a memory 204 and can also be coupleddirectly or wirelessly to a therapy delivery unit 212, which may be partof the medical device 202 (as illustrated in FIG. 2) or located externalto the medical device 202.

The medical device 202 includes a first interface 208 that is coupled toreceive heartbeat data 220 of a patient. The heartbeat data 220 may begenerated from an electrode implanted within, or externally coupled to,the patient. The heartbeat data 220 of the patient may includeelectrocardiogram data. For example, the heartbeat data 220 maycorrespond to the electrocardiogram illustrated in the first trace 110of FIG. 1. In a particular embodiment, the heartbeat data 220 is anumeric value indicating a most recent R-R interval or a signalcorresponding to an electrocardiogram data trace. The first interface208 may be configured to provide the heartbeat data 220 to the processor206.

The medical device also includes a second interface 210 that is coupledto receive activity data 230 of the patient. The activity data 230 maybe generated from a component (such as an accelerometer) within themedical device 202 (not shown in FIG. 2) or an external device such asan electrode implanted within, or externally coupled to, the patient asillustrated in FIG. 2. In a particular embodiment, the activity data 230includes accelerometer data, body temperature data, electromyographydata, perspiration data, impedance data, or a combination thereof. Theactivity data 230 may include one or more activity values that arerelated to an activity level of the patient. For example, a firstactivity value may be associated with running, a second activity valuemay be associated with walking, a third activity value may be associatedwith sleeping, etc. The activity values may be measured independently ofthe heartbeat data 220. In a particular embodiment, the activity data isa numeric value or signal indicating a measurement that is associatedwith the activity level of the patient. The second interface 210 may beconfigured to provide the activity data 230 to the processor 206.

The processor 206 may be configured to receive the heartbeat data 220from the first interface 208 and to receive the activity data 230 fromthe second interface 210. The processor 206 may perform an IIR operationon the heartbeat data 220 (e.g., perform an IIR operation on theelectrocardiogram data) to generate a background heart rate for spanningover a time period (e.g., a five minute time period). The processor 206may also be configured to determine a value of a weighting factor basedon the activity data 230.

The processor 206 may further be configured to determine modifiedheartbeat data by applying the weighting factor to at least a portion ofthe heartbeat data. Determining the modified heartbeat data may includedetermining a background heart rate based on a previously-determinedbackground heart rate, a most recent R-R interval, and the weightingfactor. Determining the modified heartbeat data may also includedetermining a foreground heart rate based on a most recent R-R interval.For example, the modified heartbeat data may correspond to the modifiedbackground heart rate illustrated in the fourth trace 140 of FIG. 1 andmay be expressed as BG_(M)=λ*BG_(n-1)+(1−λ)*FG_(n), where BG_(M) is themodified heartbeat data (e.g., the modified background heart rate),BG_(n-1) is a previously-determined background heart rate, FG_(n) is aforeground heart rate at the present time (n), and λ is the weightingfactor determined based on the activity data 230. Thus, the modifiedheartbeat data may be determined as a sum of a first value and a secondvalue. The first value (λ*BG_(n-1)) may be the weighting factor timesthe previously-determined background heart rate, and the second value((1−λ)*FG_(n)) may be one minus the weighting factor times the mostrecent R-R interval (e.g., the foreground heart rate).

In response to the activity data 230 indicating an increased activitylevel of the patient, the processor 206 is configured to determine thevalue of the weighting factor such that an effect of prior heartbeatdata (BG_(n-1)) on the modified heartbeat data is decreased. As anon-limiting example, the value of the weighting factor may beapproximately 0.95 when the activity corresponds to sleeping or a sleepstate, 0.75 when the activity corresponds to walking, and 0.50 when theactivity corresponds to running Thus, the value of the weighting factordecreases as the activity level of the patient increases. As can beappreciated, the calculation of modified background heart rate and theweighting factor can be modified to provide the same operation describedabove, but configured so that the value of the weighting factorincreases as the activity level of the patient increases.

The processor 206 may also be configured to detect an indication ofnoise in the heartbeat data 220. Noise may be detected via patterns inan electrocardiogram, such as the electrocardiogram illustrated in thefirst trace 110 of FIG. 1. For example, noise may be present if thedetected heartbeat falls below a lower threshold or rises above an upperthreshold. In a particular embodiment, the lower threshold is about 35beats per minute (bpm) and the upper threshold is about 180 bpm. Asanother example, noise may be present if a beat-to-beat variabilityrises above an upper threshold or falls below a lower threshold. In aparticular embodiment, the upper threshold may be about 115 percent andthe lower threshold is about 65 percent.

In response to the detected noise in the heartbeat data 220 increasing,the processor 206 may determine the value of the weighting factor suchthat an effect of prior heartbeat data (BG_(n-1)) on the modifiedheartbeat data is decreased. For example, in response to the detectednoise in the heartbeat data 220 increasing, the processor 206 may lowerthe value of the weighting factor so that the modified heartbeat data ismore dependent on the foreground heart rate. In response to the detectednoise in the heartbeat data decreasing, the processor 206 may determinethe value of the weighting factor such that the effect of the priorheartbeat data (BG_(n-1)) on the modified heartbeat data is increased.For example, in response to the detected noise in the heartbeat data 220decreasing, the processor 206 may raise the value of the weightingfactor so that the modified heartbeat data is more dependent on thepreviously-determined background heart rate (BG_(n-1)).

The processor 206 may further be configured to detect a seizure eventbased on the modified heartbeat data. For example, the processor 206 maycompare a ratio of the foreground heart rate and the modified backgroundheart rate (e.g., the modified heartbeat data) to a seizure detectionthreshold. When the ratio exceeds the seizure detection threshold, theprocessor 206 may determine that a seizure event is present. When theratio is below the seizure detection threshold, the processor 206 maydetermine that no seizure event is present. As explained with respect toFIG. 3, in response to detecting the seizure event, the processor 206may be configured, for example, to provide a notification that a seizureis detected, to initiate a recording of the seizure event, and/or tocause the therapy delivery unit 212 to apply stimulation to tissue ofthe patient.

The memory 204 may include tangible, non-transitory, computer-readablemedia (e.g., one or more computer memory devices). The processor 206 maybe implemented using a single-chip processor or using multipleprocessors. The memory 204 may include various memory devices, such asregisters, cache, volatile memory, and non-volatile memory. For example,the memory 204 can include cache that is accessible by the processor 206to rapidly retrieve and store data. As a non-limiting example, thememory 204 may store information corresponding to thepreviously-determined background heart rate (BG_(n-1)) and/or weightingfactor values for different activities. In a particular embodiment, alook-up table, an algorithm, or a combination thereof, is stored in thememory 204 to determine the weighting factor values based on theactivity data 230, the detected noise in the heartbeat data 220, or acombination thereof. Examples of computer-readable media that the memory204 may use include, but are not limited to: magnetic media such as harddisks, floppy disks, and magnetic tape; optical media such as CD-ROMdisks; magneto-optical media; and specially configured hardware devicessuch as application-specific integrated circuits (ASICs), programmablelogic devices (PLDs), and ROM and RAM devices.

The memory 204 may also store instructions that are executable by theprocessor 206 to implement various functions. To illustrate, theinstructions may be executable by the processor 206 to cause theprocessor to perform operations including receiving the heartbeat data220 and receiving the activity data 230. The operations may also includedetermining the value of the weighting factor based on the activity data230 and determining modified heartbeat data by applying the weightingfactor to at least a portion of the heartbeat data 220. The instructionsmay also be executable by the processor 206 to cause the processor todetect the seizure event based on the modified heartbeat data. In aparticular embodiment, the instructions are executable by the processor206 to detect R waves in an electrocardiogram, R-R intervals in anelectrocardiogram, noise in the heartbeat data 220, other informationdescriptive of a heartbeat, or a combination thereof.

Additionally or in the alternative, the medical device 202 may includededicated hardware implementations, such as application specificintegrated circuits, programmable logic arrays and other hardwaredevices, to implement one or more functions of the processor 206.Accordingly, the present disclosure encompasses software, firmware, andhardware implementations.

When the heartbeat data 220 is received as an electrocardiogram trace,the processor 206, or an application-specific integrated circuit (ASIC),may perform an IIR operation on an electrocardiogram trace to detect Rwaves and R-R intervals. The processor 206 (or ASIC) may determine aforeground heart rate by monitoring the timing between the most recent Rwaves in the electrocardiogram. The processor 206 may also determine themodified background heart rate based on prior heartbeat data stored inthe memory 204, the foreground heart rate, and the weighting factor. Forexample, the prior heartbeat data may be based on heartbeat data 220received during a five minute window prior to the heartbeat data 220associated with the foreground heart rate. Activity data 230 associatedwith patient may be provided to the processor 206 via the secondinterface 210 to determine the value of the weighting factor.

The processor 206 may detect whether a seizure event is present based onthe heartbeat data 220 and the activity data 230. For example, theprocessor 206 may compare the ratio of the foreground heart rate and themodified background heart rate to the seizure detection threshold todetermine whether the seizure event is present. In response to detectingthe seizure event, the processor 206 may, for example, send a signal toprovide a notification that a seizure is detected, to initiate arecording of the seizure event, and/or to the therapy delivery unit 212to cause the therapy delivery unit 212 to stimulate a tissue of thepatient.

Referring to FIG. 3, a block diagram of a particular embodiment ofimplantable medical device 202 within a patient is shown. The medicaldevice 202 includes the memory 204, the processor 206, the firstinterface 208, the second interface 210, the therapy delivery unit 212,a heartbeat sensor 320, and an activity sensor 330.

The medical device 202 may be adapted to be surgically implanted in apatient 306 to detect a seizure event based on activity data 230 andheartbeat data 220, to provide therapy, to monitor one or moreconditions, for another purpose, or any combination thereof. In aparticular embodiment, the medical device 202 may be coupled to one ormore electrodes 308 and may be adapted to deliver electrical stimulus totissue 304 of the patient 306 via the electrodes 308. In a particularembodiment, the medical device 202 is an implantable nerve stimulationdevice. Examples of the implantable nerve stimulation device may includean implantable cranial nerve stimulation device, an implantable spinalcord stimulation device, etc. The electrodes 308 may be coupled to themedical device 202 and may be positioned proximate to or coupled to anerve, such as a cranial nerve (e.g., the trigeminal nerve, thehypoglossal nerve, the vagus nerve or a branch of the vagus nerve).

The heartbeat sensor 320 may be configured to detect (e.g., sense) aheartbeat of the patient 306. For example, the heartbeat sensor 320 maybe coupled to a nerve via the electrodes 308 to detect the heartbeat ofthe patient 306. In a particular embodiment, the heartbeat sensor 320 isan electrocardiogram (ESG) sensor. For example, based on the detectedheartbeat, the heartbeat sensor 320 may generate electrocardiogram dataand provide the electrocardiogram data to the processor 206. Theelectrocardiogram data may correspond to the electrocardiogram dataillustrated by the first trace 110 of FIG. 1 and may indicate R wavesand R-R intervals of the detected heartbeat. The activity sensor 330 maybe configured to detect an activity level of the patient 306. Forexample, the activity sensor 330 may be coupled to a nerve via theelectrodes 308 to detect an activity level of the patient 308.Alternatively, the activity sensor 330 may include a device that detectsother indications of activity, such as an amount of perspiration, a bodytemperature, breathing rate, etc.

As explained with reference to FIG. 2, the medical device 202 mayinclude the therapy delivery unit 212 that is configured to controlgeneration of treatment stimulus provided to the electrodes 308 toprovide an electrical stimulus to the tissue 304. In another particularembodiment, the medical device 202 is an implantable drug pump. Inanother particular embodiment, the medical device 202 is an implantablesensor. Examples of an implantable sensor may include anelectrocardiogram (ESG) sensor, an electromyogram (EEG) sensor, etc.Note that the term “patient” is used broadly to include any organism andis not intended to imply that the patient 306 is human; although thepatient 306 is a human patient in one embodiment.

FIG. 4 is a flow chart of a particular embodiment of a method 400 ofdetecting a seizure event based on heartbeat data and activity data. Forexample, the method 400 may be performed by a medical device and thecomponents thereof, such as the medical device 202, the memory 204, theprocessor 206, the first interface 208, the second interface 210, thetherapy delivery unit 212 of FIGS. 2 and 3, or any combination thereof.The method 400 may be performed while monitoring for a seizure event ina patient, such as the patient 306 of FIG. 3.

The method 400 may include receiving heartbeat data of a patient, at402. For example, in FIG. 2, the first interface 208 may be coupled toreceive the heartbeat data 220 of a patient, such as the patient 306 ofFIG. 3. The heartbeat data 220 of the patient 306 may includeelectrocardiogram data (e.g., an electrocardiogram trace). For example,the heartbeat data 220 may correspond to the electrocardiogramillustrated in the first trace 110 of FIG. 1. The first interface 208may provide the heartbeat data 220 to the processor 206.

Activity data of the patient may be received, at 404. For example, inFIG. 2, the second interface 210 may be coupled to receive the activitydata 230. The activity data 230 may include one or more activity valuesthat are related to an activity level of the patient 306 and that aremeasured independently of the heartbeat data 220. In a particularembodiment, the activity data 230 includes accelerometer data, bodytemperature data, electromyography data, perspiration data, impedancedata, or a combination thereof. In a particular embodiment, the activitydata 230 may be detected (e.g., sensed) by the activity sensor 330.Additionally or alternatively, the activity data 230 may be receivedwirelessly from one or more external sensors (not shown). The secondinterface 210 may provide the activity data 230 to the processor 206.

A value of a weighting factor may be determined based on the activitydata, at 406. For example, in FIG. 2, the processor 206 may determinethe value of the weighting factor such that an effect of prior heartbeatdata on the modified heartbeat data is decreased in response to theactivity data 230 indicating an increased activity level of the patient306.

Modified heartbeat data may be determined by applying the weightingfactor to at least a portion of the heartbeat data, at 408. For example,the processor 206 of FIG. 2 may determine the modified heartbeat databased on an algorithm, such as BG_(M)=λ*BG_(n-1)+(1−λ)*FG_(n), whereBG_(M) is the modified heartbeat data (e.g., the modified backgroundheart rate), BG_(n-1) is a previously-determined background heart rate,FG_(n) is a foreground heart rate at the present time (n), and λ is theweighting factor determined based on the activity data. Thus, themodified heartbeat data may be determined as a sum of a first value anda second value. The first value (λ*BG_(n-1)) may be the weighting factortime the previously-determined background heart rate and the secondvalue ((1−λ)*FG_(n-1)) may be one minus the weighting factor times themost recent R-R interval (e.g., the foreground heart rate).

A seizure event may be detected based on the modified heartbeat data, at410. For example, the processor 206 of FIG. 2 may compare a ratio of theforeground heart rate and the modified background heart rate (e.g., themodified heartbeat data) to a seizure detection threshold. When theratio exceeds the seizure detection threshold, the processor 206 maydetermine that a seizure event is present. When the ratio is below theseizure detection threshold, the processor 206 may determine that thereis no seizure event present.

In a particular embodiment, the method 400 may include detecting anindication of noise in the heartbeat data. For example, the processor206 of FIG. 2 may detect an indication of noise in the heartbeat data220. The weighting factor may be further determined based on theindication of noise in the heartbeat data. For example, in response tothe detected noise in the heartbeat data 220 increasing, the processor206 may determine the value of the weighting factor such that an effectof prior heartbeat data on the modified heartbeat data is decreased.Thus, in response to the detected noise in the heartbeat data 220increasing, the processor 206 may lower the value of the weightingfactor so that the modified heartbeat data is more dependent on theforeground heart rate. Alternatively, in response to the detected noisein the heartbeat data decreasing, the processor 206 may determine thevalue of the weighting factor such that the effect of the priorheartbeat data on the modified heartbeat data is increased. Thus, inresponse to the detected noise in the heartbeat data 220 decreasing, theprocessor 206 may raise the value of the weighting factor so that themodified heartbeat data is more dependent on the previously-determinedbackground heart rate.

In a particular embodiment, the method 400 may include causingstimulation to be applied to tissue of the patient in response todetecting the seizure event. For example, the therapy delivery unit 212of FIG. 3 may control generation of treatment stimulus provided to theelectrodes 308 to provide an electrical stimulus to the tissue 304 inresponse to the processor 206 detecting the seizure event. In anotherparticular embodiment, the method 400 may include generating a reportregarding the detection of a seizure event, and may include theinitiation of a recording of a detected seizure event.

The illustrations of the embodiments described herein are intended toprovide a general understanding of the structure of the variousembodiments. The illustrations are not intended to serve as a completedescription of all of the elements and features of apparatus and systemsthat utilize the structures or methods described herein. Many otherembodiments may be apparent to those of skill in the art upon reviewingthe disclosure. Other embodiments may be utilized and derived from thedisclosure, such that structural and logical substitutions and changesmay be made without departing from the scope of the disclosure. Forexample, method steps may be performed in a different order than isshown in the figures or one or more method steps may be omitted.Accordingly, the disclosure and the figures are to be regarded asillustrative rather than restrictive.

Moreover, although specific embodiments have been illustrated anddescribed herein, it should be appreciated that any subsequentarrangement designed to achieve the same or similar results may besubstituted for the specific embodiments shown. This disclosure isintended to cover any and all subsequent adaptations or variations ofvarious embodiments. Combinations of the above embodiments, and otherembodiments not specifically described herein, will be apparent to thoseof skill in the art upon reviewing the description.

The Abstract of the Disclosure is submitted with the understanding thatit will not be used to interpret or limit the scope or meaning of theclaims. In addition, in the foregoing Detailed Description, variousfeatures may be grouped together or described in a single embodiment forthe purpose of streamlining the disclosure. This disclosure is not to beinterpreted as reflecting an intention that the claimed embodimentsrequire more features than are expressly recited in each claim. Rather,as the following claims reflect, the claimed subject matter may bedirected to less than all of the features of any of the disclosedembodiments.

What is claimed is:
 1. A method comprising: receiving heartbeat data of a patient; receiving activity data of the patient, wherein the activity data includes one or more activity values that are related to an activity level of the patient and that are measured independently of the heartbeat data; determining a value of a weighting factor based on the activity data; determining modified heartbeat data by applying the weighting factor to at least a portion of the heartbeat data; and detecting a seizure event based on the modified heartbeat data.
 2. The method of claim 1, wherein determining the modified heartbeat data includes determining a background (BG) heart rate based on a previously-determined BG heart rate, a most recent R-R interval, and the weighting factor.
 3. The method of claim 2, wherein the BG heart rate is determined as a sum of a first value and a second value, wherein the first value is the weighting factor times the previously-determined BG heart rate and the second value is one minus the weighting factor times the most recent R-R interval.
 4. The method of claim 2, wherein determining the modified heartbeat data further includes determining a foreground (FG) heart rate based on one or more R-R intervals of the heartbeat data.
 5. The method of claim 4, wherein detecting the seizure event comprises comparing a ratio of the FG heart rate and the BG heart rate to a seizure detection threshold.
 6. The method of claim 1, wherein the heartbeat data of the patient includes electrocardiogram data.
 7. The method of claim 6, wherein the electrocardiogram data indicates a timing related to a plurality of R-waves.
 8. The method of claim 1, further comprising detecting an indication of noise in the heartbeat data, wherein the weighting factor is determined further based on the indication of noise in the heartbeat data.
 9. The method of claim 8, wherein: in response to detecting an increase in the noise in the heartbeat data, the value of the weighting factor is determined such that an effect of prior heartbeat data on the modified heartbeat data is decreased; and in response to detecting a decrease in the noise in the heartbeat data, the value of the weighting factor is determined such that the effect of the prior heartbeat data on the modified heartbeat data is increased.
 10. The method of claim 1, further comprising causing, in response to the detection of the seizure event, initiating at least one of a stimulation to tissue of the patient, a reporting of the occurrence of the seizure event, and a recording of the seizure event.
 11. The method of claim 1, wherein the activity data includes accelerometer data, body temperature data, electromyography data, perspiration data, impedance data, or a combination thereof.
 12. The method of claim 1, wherein, in response to the activity data indicating an increased activity level of the patient, the value of the weighting factor is determined such that an effect of prior heartbeat data on the modified heartbeat data is decreased.
 13. A medical device comprising: a first interface to receive heartbeat data of a patient; a second interface to receive activity data of the patient, wherein the activity data includes one or more activity values that are related to an activity level of the patient and that are measured independently of the heartbeat data; and a processor configured to: determine a value of a weighting factor based on the activity data; determine modified heartbeat data by applying the weighting factor to at least a portion of the heartbeat data; and detect a seizure event based on the modified heartbeat data.
 14. The medical device of claim 13, wherein determining the modified heartbeat data includes determining a background (BG) heart rate based on a previously-determined BG heart rate, a most recent R-R interval, and the weighting factor.
 15. The medical device of claim 14, wherein the BG heart rate is determined as a sum of a first value and a second value, wherein the first value is the weighting factor times the previously-determined BG heart rate and the second value is one minus the weighting factor times the most recent R-R interval.
 16. The medical device of claim 14, wherein determining the modified heartbeat data further includes determining a foreground (FG) heart rate based on one or more R-R intervals of the heartbeat data, wherein the seizure event is detected by comparing a ratio of the FG heart rate and the BG heart rate to a seizure detection threshold.
 17. The medical device of claim 13, wherein the processor is configured to detect an indication of noise in the heartbeat data, wherein in response to the noise in the heartbeat data increasing, the processor determines the value of the weighting factor such that an effect of prior heartbeat data on the modified heartbeat data is decreased, and wherein, in response to the noise in the heartbeat data decreasing, the processor determines the value of the weighting factor such that the effect of the prior heartbeat data on the modified heartbeat data is increased.
 18. The medical device of claim 13, wherein the processor, in response to the detection of the seizure event, provides a signal to at least one of stimulation device disposed to provide stimulation to tissue of the patient, a signal indicating the occurrence of the seizure event, and a signal initiating the recording of the seizure event.
 19. The medical device of claim 13, wherein activity data includes accelerometer data, body temperature data, electromyography data, perspiration data, impedance data, or a combination thereof.
 20. The medical device of claim 13, wherein, in response to the activity data indicating an increased activity level of the patient, the processor determines the value of the weighting factor such that an effect of prior heartbeat data on the modified heartbeat data is decreased.
 21. A non-transitory computer-readable medium storing instructions that are executable by a processor to cause the processor to perform operations including: receiving heartbeat data of a patient; receiving activity data of the patient, wherein the activity data includes one or more activity values that are related to an activity level of the patient and that are measured independently of the heartbeat data; determining a value of a weighting factor based on the activity data; determining modified heartbeat data by applying the weighting factor to at least a portion of the heartbeat data; and detecting a seizure event based on the modified heartbeat data. 